import actionType from "./actionType";

const initState={
    list:[]
}
// 22、考虑使用关注全局状态的存储 10：32
const reducer=(state=initState,action:any)=>{
    const {type,payload} =action
    switch (type) {
        case actionType.SET_LIST:
            
            return{
                ...state,
                list:payload
            }
    
        default:
            return{
                ...state
            }
    }
}

export default reducer